package main

import "fmt"

func main() {
	strings := [...]string{"one", "two", "three"}
	var index int = 1
	fmt.Printf("Original array is: %v\n", strings)
	newStrings := remove(&strings, index)
	fmt.Printf("After remove index %d, new array is: %v\n", index, newStrings)
	fmt.Printf("After remove index %d, old array is: %v\n", index, strings)
}

//
func remove(strings *[3]string, i int) []string {
	copy(strings[i:], strings[i+1:])
	return strings[:len(strings)-1]
}
